<template>

    <el-container style="min-height:100vh; ">
      <el-aside  :width="sideWidth+'px'" style="background-color: rgb(238, 241, 246); box-shadow:2px 0 6px rgba(0, 21, 41 ,0.35);"  >
        <Aside :isCollapse="isCollapse" :logo-text-show="logoTextShow"/>
      </el-aside>

      <el-container>
        <el-header style="  border-bottom: 1px solid #ccc;">
          <Header :collapseBtnClss="collapseBtnClss" :collapse="isCollapse"/>
        </el-header>
<!--当前页面的子路有会在router-view里展示-->
        <el-main>
<router-view/>
        </el-main>
      </el-container>
    </el-container>

</template>

<script>
import request from "@/utils/request";
import Aside from "@/components/Aside";
import Header from "@/components/Header";
export default {
  name: 'HomeView',
  components: {
    Aside,
    Header
  },

  data(){
    return{

      msg:"hello world",
      isCollapse:false,
      collapseBtnClss:'el-icon-s-fold',
      sideWidth:200,
      logoTextShow:true,
        phtName:true
    }
  },
  created() {
    //请求分页查询数据

  },
  methods: {
    collapse() {
      this.isCollapse = !this.isCollapse
      if (this.isCollapse) {
        this.sideWidth = 64
        this.collapseBtnClss = "el-icon-s-unfold"
        this.logoTextShow = false

      } else {
        this.logoTextShow = true
        this.sideWidth = 200
        this.collapseBtnClss = "el-icon-s-fold"
      }
    }
  }
}
</script>
